package cn.tedu.boke.portal.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 帖子
 * </p>
 *
 * @author tedu.cn
 * @since 2021-11-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("post")
public class Post implements Serializable
{

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 标题
     */
    @TableField("title")
    private String title;

    /**
     * 正文
     */
    @TableField("content")
    private String content;

    /**
     * 用户id
     */
    @TableField("user_id")
    private Integer userId;

    @TableField("viewnum")
    private Integer viewnum;

    @TableField("likenum")
    private Integer likenum;

    @TableField("commentnum")
    private Integer commentnum;

    /**
     * 是否公开0私有,1公开
     */
    @TableField("public_status")
    private Integer publicStatus;

    /**
     * 假删除,1为删除
     */
    @TableField("delete_status")
    private Integer deleteStatus;

    /**
     * 创建时间
     */
    @TableField("createtime")
    private LocalDateTime createtime;

    /**
     * 更改时间
     */
    @TableField("updatetime")
    private LocalDateTime updatetime;

    /**
     * 标签列表
     */
    @TableField(exist = false)
    private List<Tag> tags;


}
